<?php
 /**
 * 改写view urls助手类
 *
 * LICENSE: 
 * @author $Id: Urls.php 31 2011-11-22 06:22:25Z kylingood $
 * @since      Release 1.0.0
 * @copyright  Copyright (c) 2010-2011 Mumayi.com Inc. (http://www.mumayi.com)
*/
require_once 'Zend/View/Helper/Abstract.php';

class Custom_View_Helper_Urls extends Zend_View_Helper_Abstract
{
    public function urls($action = NULL,$controller = NULL,$module = NULL,array $urlOptions = array(), $name = null, $reset=true, $encode = true)
    {
    	
		if(NULL!== $action){
			$urlOptions['action'] = $action;
		}
		
        if(NULL!== $controller){
			$urlOptions['controller'] = $controller;	
		}
		
    	if(NULL!== $module){			
			$urlOptions['module'] = $module;
		}
		
    	$router = Zend_Controller_Front::getInstance()->getRouter();
        return $router->assemble($urlOptions, $name, $reset, $encode);
          
    }
}